package com.c.yinyuezhushou.Sql;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class MySql extends SQLiteOpenHelper {
    String sql = "create table LsMusicItem(" +
            "id integer,"+
            "song text,"+
            "singer text,"+
            "imageurl text"+
            ")";

    String sql1 = "create table LoveMusicItem(" +
            "id integer,"+
            "song text,"+
            "singer text,"+
            "imageurl text"+
            ")";

    String sql2 = "create table SongListMusicItem(" +
            "id integer,"+
            "song text,"+
            "singer text,"+
            "imageurl text,"+
            "slname text"+
            ")";
    String sql3 = "create table SongList(" +
            "imageurl text,"+
            "slname text"+
            ")";



    private Context context;

    public MySql(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
        this.context = context;
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        sqLiteDatabase.execSQL(sql);
        sqLiteDatabase.execSQL(sql1);
        sqLiteDatabase.execSQL(sql2);
        sqLiteDatabase.execSQL(sql3);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
